﻿using mds.BaseFrameModel;
using mds.ServiceInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;

namespace mds.CMS
{
    [ServiceContract(Namespace = "")]
    public interface ICMS
    {
        [OperationContract(Name = "GetTemplatePage")]
        GridPage<PageTemplate> GetTemplatePage(int currentPage, int pageSize, string searchKey);
        [OperationContract(Name = "GetInfoPage")]
        GridPage<WebInfo> GetInfoPage(int currentPage, int pageSize, string searchKey);
        /// <summary>
        /// 更新站点信息操作
        /// </summary>
        /// <param name="infoId"></param>
        /// <param name="infoType"></param>
        /// <param name="title"></param>
        /// <param name="tag"></param>
        /// <param name="infoContent"></param>
        /// <param name="author"></param>
        /// <param name="publicDate"></param>
        /// <param name="localPath">静态文件生成的本地路径,如果为空则不会生成静态文件</param>
        /// <param name="fileName">静态文件的文件名,如果为空则以时间序列为文件名</param>
        /// <param name="createBy"></param>
        /// <param name="modifyBy"></param>
        /// <returns></returns>
        [OperationContract(Name = "WebInfoUpdate")]
        OperationResult<int> WebInfoUpdate(int infoId, int infoType, string title, string tag, string infoContent, string author, DateTime publicDate,int templateId, string localPath, string fileName, int createBy, int modifyBy);
        [OperationContract(Name = "PageTempateUpdate")]
        OperationResult<int> PageTemplateUpdate(int pageTemplateId, string templateName, string templateContent, int templateType, int createBy, int modifyBy);
        [OperationContract(Name = "DeleteInfos")]
        OperationResult<bool> DeleteInfos(int[] infoIds, int operationBy);
        [OperationContract(Name = "DeleteTemplates")]
        OperationResult<bool> DeleteTemplates(int[] templateIds, int operationBy);
    }
}
